#{extends 'main.html' /}
#{set title:'Show rides' /}

<link href="@{'/public/css/main.css'}" rel="stylesheet" type="text/css" />
<link href="@{'/public/css/tables.css'}" rel="stylesheet" type="text/css" />

 <div class="content"> 

 <table class="hor-minimalist-a">
        <thead >
            <tr valign="middle">
                <th  align="center">Start point</th>
                <th align="center">Destination</th>
                <th align="center">Ride date</th>
                <th align="center">Show details</th>
                <th align="center">What booked</th>
            </tr>
        </thead>
        <tbody>
            #{list bookings, as:'booking'}
                <tr valign="middle">
                    <td align="center">${booking.ride.startPoint}</td>
                    <td align="center">${unis.destinationCampusMap.get(booking.ride.destinationCampusId)}</td>
                    <td align="center">${booking.ride.rideDate} ${booking.ride.timeOfArrival}</td>
                    <td align="center"><a href="@{show(booking.ride.id)}">Show ride</a></td>
                    <td align="center"><a href="@{deleteBooking(booking.ride.id)}">Delete ride</a></td>
                </tr>
            #{/list}
        </tbody>
    </table>
    </table>
</div>
